package com.weitu.emergency.service.impl;

import com.weitu.emergency.entity.StoragePoint;
import com.weitu.emergency.mapper.StoragePointMapper;
import com.weitu.emergency.service.StoragePointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017-05-10
 */
@Service
public class StoragePointServiceImpl implements StoragePointService {

    private final StoragePointMapper storagePointMapper;


    @Autowired
    public StoragePointServiceImpl(StoragePointMapper storagePointMapper) {
        this.storagePointMapper = storagePointMapper;
    }

    @Override
    public List<StoragePoint> findByParam(Map paramMap) {

        return storagePointMapper.findByParam(paramMap);
    }

    @Override
    public Integer findByParamCount(Map paramMap) {
        return storagePointMapper.findByParamCount(paramMap);
    }

    @Override
    public StoragePoint findById(String id) {
        return storagePointMapper.findById(id);
    }

    @Override
    public Integer add(Map paramMap) {
        return storagePointMapper.add(paramMap);
    }

    @Override
    public Integer updateById(Map paramMap) {
        return storagePointMapper.updateById(paramMap);
    }
}
